package com.guoyw.rabbitmq.rabbitmq.producer.basics;

import org.springframework.amqp.core.Exchange;
import org.springframework.amqp.core.ExchangeBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: TODO
 * @Author: guoyw
 * @CreateDate: 2021/3/20 8:05 下午
 * @Version: 1.0
 * @Copyright COPYRIGHT © 2021 言津信息.沪ICP备18011820号.
 */

@Configuration
public class RabbitmqConfig {

  public static final String EXCHANGE_NAME="basics-exchange";

  @Bean("basicsExchange")
  public Exchange basicsExchange(){
    return ExchangeBuilder.topicExchange(EXCHANGE_NAME).build();
  }

}
